package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.vo.CountBorrow;
import com.ruoyi.system.domain.vo.CountCategory;
import com.ruoyi.system.domain.vo.CountStatus;
import com.ruoyi.system.mapper.SysAssetBorrowApplyMapper;
import com.ruoyi.system.mapper.SysAssetMapper;
import com.ruoyi.system.service.SysCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Description:
 * Author: ZLZ
 * Date: 2025/4/2
 */
@Service
public class SysCountServiceImpl implements SysCountService {
    @Autowired
    private SysAssetMapper sysAssetMapper;
    @Autowired
    private SysAssetBorrowApplyMapper sysAssetBorrowApplyMapper;

    /**
     * 统计资产分类
     * @return
     */
    @Override
    public List<CountCategory> countCategory() {
        return sysAssetMapper.countCategory();
    }

    /**
     * 统计资产状态
     * @return
     */
    @Override
    public List<CountStatus> countStatus() {
        return sysAssetMapper.countStatus();
    }

    /**
     * 统计资产借用
     * @return
     */
    @Override
    public List<CountBorrow> countBorrow() {
        return sysAssetBorrowApplyMapper.countBorrow();
    }
}
